home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / commodore-users-of-norman / CUON_31_(10-1984).d64 / new 51k backup (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  5KB  |  168 lines

  1. 100 REM MOD FR 6/83 GAZETTE BY J RUBIN
  2. 110 GOTO700
  3. 199 REM READ DISK ERR
  4. 200 INPUT#1,ER,ER$,E2%,E3%:RETURN
  5. 299 REM READ BLOCK
  6. 300 POKE53280,NU
  7. 310 C=.:V=1107+S1*40+T1
  8. 320 REM ADD SKIP IF YOU HAVE PARALLEL IEEE INTERFACE HERE
  9. 330 POKE255,BB+NU
  10. 340 PRINT#1,"U1";3;.;T1;S1:GOSUB200:IFER=.GOTO370
  11. 350 C=C+1:IFC<3GOTO340
  12. 360 POKEV,ER:SYS902:RETURN
  13. 370 PRINT#1,"B-P";3;.:SYSMA
  14. 380 IFNU<>.THENPOKEV,127
  15. 390 IFST<>.ANDST<>64THENGOSUB200:GOTO360
  16. 400 RETURN
  17. 499 REM WRITE BLOCK
  18. 500 POKE53280,NU
  19. 510 C=.
  20. 520 IFU%=.THENPRINT#1,"B-A";.;T1;S1
  21. 530 PRINT#1,"B-P";3;.
  22. 540 IFNU<>.THENPOKE1107+S1*40+T1,32
  23. 550 REM ADD SKIP IF YOU HAVE PARALLEL IEEE INTERFACE HERE
  24. 560 POKE255,BB+NU:SYSMA+3
  25. 570 IFST<>.ANDST<>64THENPRINT"IEEE WRITE"ST:GOTO10000
  26. 580 PRINT#1,"U2";3;.;T1;S1
  27. 590 GOSUB200:IFER=.GOTO620
  28. 600 C=C+1:IFC<3GOTO580
  29. 610 PRINT"UNRECOVERABLE WRITE ERROR"ER,ER$,E2%,E3%:GOTO10000
  30. 620 RETURN
  31. 699 REM MAIN PROGRAM
  32. 700 FORI=828TO923:READA:POKEI,A:NEXT:PRINT"";:POKE53281,6:POKE53280,2:POKE.,47
  33. 710 FORI=0TO24:POKE54272+I,0:NEXT:POKE54273,20:POKE54277,153:POKE54278,153
  34. 720 POKE55,.:POKE56,35:CLR:BB=35:N=220:BA=BB*256:MA=828
  35. 730 DIMBM%(35,21):FORJ=.TO7:TA(J)=2^J:NEXT
  36. 740 PRINT"[147]BACKUP 1541"
  37. 750 PRINT"'GOTO10000' IF PROGRAM QUITS ABNORMALLY"
  38. 760 OPEN1,8,15
  39. 770 GOSUB2000
  40. 780 PRINT"[147]DO YOU WANT TO BLANK THE SCREEN?";
  41. 790 GOSUB3200:IFA$="Y"THENSB=1:PRINT#1,"UI-"
  42. 800 PRINT"DO YOU WANT TO COPY ALL 683[146] SECTORS?";
  43. 810 GOSUB3200:IFA$="Y"THENDB=1
  44. 820 PRINT"[147]";:D$="S":GOSUB3000:I2$=IR$
  45. 830 IFDR$<>"2A"THENPRINT"[147]ILLEGAL DOS 1.0 DISK":GOTO10000
  46. 840 IFI2$=I1$THENPRINT"[147]SOURCE AND DESTINATION HAVE SAME ID CODE":GOTO10000
  47. 850 GOSUB2500
  48. 860 IFDBTHENTS=1:TF=35
  49. 870 T=TS:S=.:NU=1:T1=T:S1=S
  50. 880 PRINT#1,"I0":OPEN3,8,3,"#"
  51. 890 U%=BM%(T1,S1):IFU%=-1THEN920
  52. 900 IF(U%=.)OR(DB=1)THENGOSUB300:NU=NU+1:IFNU>NTHEN930
  53. 910 S1=S1+1:GOTO890
  54. 920 S1=.:T1=T1+1:IFT1<=TFGOTO890
  55. 930 CLOSE3
  56. 940 D$="D":GOSUB3000:A$="N":IFI1$=""THENI1$=IR$:A$="Y":IFI1$=I2$GOTO840
  57. 950 IFA$="Y"THENPRINT#1,"N0:"DN$:GOSUB200:IFER<>0THENPRINTER,ER$:GOTO10000
  58. 960 IFIR$<>I1$THENPRINT"";:GOTO940
  59. 970 PRINT#1,"I0":OPEN3,8,3,"#"
  60. 980 NU=1:T1=T:S1=S
  61. 990 U%=BM%(T1,S1):IFU%=-1GOTO1020
  62. 1000 IF(U%=.)OR(DB=1)THENGOSUB500:NU=NU+1:IFNU>NGOTO1030
  63. 1010 S1=S1+1:GOTO990
  64. 1020 S1=.:T1=T1+1:IFT1<=TFGOTO990
  65. 1030 CLOSE3
  66. 1040 S=S1+1:IFS>20THENS=.:T1=T1+1
  67. 1050 T=T1:IFT>TFGOTO1080
  68. 1060 D$="S":GOSUB3000:IFIR$<>I2$THENPRINT"";:GOTO1060
  69. 1070 NU=1:T1=T:S1=S:GOTO880
  70. 1080 POKE53265,27:PRINT#1,"UI+":CLOSE1
  71. 1090 POKE55,0:POKE56,160:CLR
  72. 1100 POKE53280,6:PRINT"[147]BACKUP COMPLETE"
  73. 1110 OPEN1,8,0,"$0":GET#1,A$,B$:N$=CHR$(0)
  74. 1120 GET#1,A$,B$:IFB$=""GOTO1160
  75. 1130 GET#1,A$,B$:PRINTASC(A$+N$)+256*ASC(B$+N$);
  76. 1140 GET#1,A$:IFA$<>""THENPRINTA$;:GOTO1140
  77. 1150 PRINT:GOTO1120
  78. 1160 CLOSE1:END
  79. 1999 REM FORMAT DISK
  80. 2000 INPUT"DESTINATION DISK NAME   ";DN$
  81. 2010 IFDN$=""THENPRINT"[145][145][145][145]":GOTO2000
  82. 2020 IFLEN(DN$)>16THENCLR:GOTO400
  83. 2030 F=0:FORJ=1TOLEN(DN$):S1$=MID$(DN$,J,1)
  84. 2040 IFS1$=""ORS1$=CHR$(34)THENF=1
  85. 2050 NEXTJ:IFFTHENPRINT"[145][145][145][145]":GOTO2000
  86. 2060 PRINT"TOTALLY FORMAT THE DISK?";
  87. 2070 GOSUB3200:IFA$="N"THENRETURN
  88. 2080 INPUT"UNIQUE DISK ID                   ";I1$
  89. 2090 IFI1$=""THENPRINT"[145][145]":GOTO2080
  90. 2100 IFLEN(I1$)<>2THENPRINT"[145][145]":GOTO2080
  91. 2110 D$="E":PRINT"[147]";:GOSUB3000
  92. 2120 IFER<>0GOTO2160
  93. 2130 POKE54276,33:POKE54296,15:PRINT:PRINT"ALREADY FORMATTED DISK!!!"
  94. 2140 PRINT"ARE YOU SURE???";:GOSUB3200:POKE54276,32:POKE54296,.
  95. 2150 IFA$<>"Y"GOTO2000
  96. 2160 POKE54276,32:POKE54296,0:PRINT#1,"N0:"+DN$+","+I1$
  97. 2170 GOSUB200
  98. 2180 IFERTHENPRINTER$:GOTO10000
  99. 2190 RETURN
  100. 2499 REM GET BAM
  101. 2500 TS=1:TF=.
  102. 2510 PRINT#1,"I0":OPEN3,8,3,"#"
  103. 2520 S9=0
  104. 2530 POKE53281,1:PRINT"[147]";:POKE53281,6
  105. 2540 NU=0:T1=18:S1=0:C0$=CHR$(.):GOSUB300:CLOSE3
  106. 2550 FORI=0TO20:POKE1104+I*40,ASC(RIGHT$(STR$(I),1)):NEXT
  107. 2560 FORI=1TO35:POKE1987+I,ASC(RIGHT$(STR$(I),1)):NEXT
  108. 2570 POKE53265,27:BY=4
  109. 2580 T%=(BY-4)/4+1
  110. 2590 IFPEEK(BA+BY)=.THENFORJ=.TO20:BM%(T%,J)=.:NEXT:BY=BY+4:GOTO2640
  111. 2600 S=0
  112. 2610 BY=BY+1:A0=PEEK(BA+BY):FORJ=.TO7:U%=S:IFU%>21THENU%=21
  113. 2615 BM%(T%,U%)=A0ANDTA(J):S=S+1:NEXT
  114. 2620 IFS<22THEN2610
  115. 2630 BY=BY+1
  116. 2640 ES=21:IFT%>17THENES=19
  117. 2650 IFT%>24THENES=18
  118. 2660 IFT%>30THENES=17
  119. 2670 FORJ=ESTO21:BM%(T%,J)=-1:NEXT
  120. 2680 SM=.:FORJ=.TO20:SL%=1107+J*40+T%:POKESL%,45:IFBM%(T%,J)<>.THEN2700
  121. 2690 SM=SM+1:POKESL%,160
  122. 2700 NEXT:S9=S9+SM
  123. 2710 IFT%<=17THEN2750
  124. 2720 POKE1907+T%,46:POKE1867+T%,46:IFT%<=24THEN2750
  125. 2730 POKE1827+T%,46:IFT%<=30THEN2750
  126. 2740 POKE1787+T%,46
  127. 2750 IFSM=.ANDTS=T%THENTS=TS+1:GOTO2770
  128. 2760 IFSM<>.THENTF=T%
  129. 2770 IFBY<143GOTO2580
  130. 2780 IFDB=1THENS9=683
  131. 2790 PRINT""S9;"BLOCKS TO XFER";
  132. 2800 S8=90+25+(.650+.980)*S9
  133. 2810 IFSB=0THENS8=S8*1.25
  134. 2820 S7=INT(S8/60)
  135. 2830 PRINTS7":"INT(S8-S7*60);
  136. 2840 IFSB=1THENPOKE53265,11
  137. 2850 RETURN
  138. 2999 REMCHANGE DISK ROUTINE
  139. 3000 POKE53265,27
  140. 3010 IFD$="D"THENS1$="DESTINATION":POKE53280,2:GOTO3040
  141. 3020 IFD$="E"THENS1$="DESTINATION":POKE53280,2:GOTO3040
  142. 3030 S1$="SOURCE":POKE53280,5
  143. 3040 POKE54276,33:POKE54296,15:PRINT"INSERT ";S1$;" DISK, PRESS SHIFT [146][191][157]";
  144. 3050 POKE204,0:WAIT653,1:POKE54276,32:POKE54296,0
  145. 3060 IFSB=1THENPOKE53265,11
  146. 3070 POKE204,1:OPEN2,8,0,"$0"
  147. 3080 GOSUB200:IFD$="E"THENCLOSE2:RETURN
  148. 3090 IFER>0THENCLOSE2:PRINT"";:GOTO3000
  149. 3100 FORJ=1TO26:GET#2,A$:NEXTJ
  150. 3110 GET#2,A$:GET#2,B$:IR$=A$+B$
  151. 3120 GET#2,A$:GET#2,A$:GET#2,B$:DR$=A$+B$
  152. 3130 PRINT"                                        ";
  153. 3140 CLOSE2:RETURN
  154. 3199 REM GET Y/N ROUTINE
  155. 3200 PRINTTAB(37)"[191][157]";
  156. 3210 POKE204,0:GETA$:IFA$=""THEN3210
  157. 3220 POKE204,1
  158. 3230 IFA$="Y"THENPRINT"YES":RETURN
  159. 3240 IFA$="N"THENPRINT"NO":RETURN
  160. 3250 GOTO3210
  161. 9999 REM ABNORMAL EXIT
  162. 10000 PRINT#1,"UJ":POKE55,0:POKE56,160:CLR:POKE53265,27:STOP
  163. 15000 DATA56,176,3,56,176,34,162,3,32,198,255,160,0,132,254,32,207,255,120,162
  164. 15010 DATA52,134,1,145,254,162,55,134,1,88,165,144,208,3,200,208,234,76,204,255
  165. 15020 DATA162,3,32,201,255,160,0,132,254,120,169,52,133,1,177,254,162,55,134,1
  166. 15030 DATA88,32,210,255,165,144,208,3,200,208,234,76,204,255,160,.,132,254
  167. 15040 DATA169,255,120,162,52,134,1,145,254,200,208,251,162,55,134,1,88,96
  168.